<?php
session_start();

$time_out = 60;
if(empty($_SESSION['timeout'])){
    $_SESSION['timeout'] = time();
} else {
    $inactive_time = time() - $_SESSION['timeout'];
    if($inactive_time > $time_out){
        $_SESSION['timeout'] = time();
    }
}